package cn.j2ee.chapter2.web.service;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.AuthenticationFailureHandler;

/**
 * 
 * 2016年11月15日 下午4:20:56
 */
public class AuthenticationFailureHandlerImpl implements AuthenticationFailureHandler{

	@Override
	public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException authenticationException)
			throws IOException, ServletException {
		System.out.println("onAuthenticationSuccess");
		 response.sendRedirect("hello");
	}

}
